home *** CD-ROM | disk | FTP | other *** search
- #include <stdlib.h>
- #include "bufsetup.h"
-
- BufferSetup::BufferSetup() : Bl(rect(30, 3, 73, 8), "",
- " Buffer parameters ", 6,
- FIXED, SHOW_BORDER, SHOW_BORDER, 47, 16, 16)
- {
- FILE* f;
- w = 639;
- h = 479;
-
- buffer_width = new CaptureEditLine(loc(32, 5), 5, " Image Width ",
- C_RIGHT);
- buffer_height = new CaptureEditLine(loc(32, 6), 5, " Image Height ",
- C_RIGHT);
-
- go = new Button(rect(60, 5, 72, 6),
- "Save", BUTTON_BORDER, 16);
-
- go->set_ret(RET_OK | RET_MOUSE | RET_CANCEL);
- insert(buffer_height, 1);
- insert(buffer_width, 1);
- insert(go, 1);
- assign(buffer_width, cancel_element, AC_CANCEL);
- buffer_width->set_ret(RET_CANCEL | RET_OK);
- buffer_height->set_ret(RET_CANCEL | RET_OK);
-
- buffer_width->put_string("639");
- buffer_height->put_string("479");
- }
- /////////////////////////
- void BufferSetup::exe(int act)
- {
- Bl::exe(act);
- w = atoi(buffer_width->get_string());
- h = atoi(buffer_height->get_string());
-
- global_num = 1;
- mouseHideCursor();
- }
-